<style lang="less" scoped>
@import url('./style.less');
.txt {
  color: #3399fe;
}
.code {
  color: #666;
  font-size: 12px;
}
.panel-content__item-label {
  width: 100px;
}
</style>
<template>
  <div class="box">
    <div class="box-title" @click="show=!show">
      <div class="box-title__label">海关行政处罚</div>
      <div class="box-title__right">
        <span class="num">{{len||'无'}}</span>
        <i :class="cls"></i>
      </div>
    </div>
    <div class="box-content" v-show="show">
      <div class="panel" v-for="(item, index) in dt" :key="index">
        <div class="panel-content">
          <div class="panel-content__item">
            <div class="panel-content__item-label">处罚决定书编号</div>
            <div class="panel-content__item-right">{{item.decisionNo || '-'}}</div>
          </div>
          <div class="panel-content__item">
            <div class="panel-content__item-label">当事人</div>
            <div class="panel-content__item-right">{{item.party || '-'}}</div>
          </div>
          <div class="panel-content__item">
            <div class="panel-content__item-label">处罚日期</div>
            <div class="panel-content__item-right">{{item.penaltDate || '-'}}</div>
          </div>
          <div class="panel-content__item">
            <div class="panel-content__item-label">案件性质</div>
            <div class="panel-content__item-right">{{item.case || '-'}}</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: ['dt'],
  data() {
    return {
      show: false
    };
  },
  onUnload() {
    this.show = false;
  },
  computed: {
    cls() {
      const arrow = this.show ? 'icon-shangjiantou' : 'icon-tubiaozhizuo-';
      return `iconfont ${arrow}`;
    },
    len() {
      let tmp = 0;
      try {
        tmp = this.dt.length;
      } catch (error) {}
      return tmp;
    }
  },
  methods: {}
};
</script>
